package com.ehotting.eaf.core.domain.system.api;

import com.ehotting.eaf.core.annotation.Excel;
import com.ehotting.eaf.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * C端用户license对象 user_license
 * 
 * @author edsta
 * @date 2023-03-24
 */
public class UserLicense extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 用户账号
     */
    private String username;

    /** 授权码 */
    @Excel(name = "授权码")
    private String license;

    /**
     * 许可证类型，目前分为 [1：正式使用:2，试用:]
     */
    private String licenseType;

    /**
     * 机器码
     */
    private String machineCode;

    /**
     * 功能名称，区分业务类型和范围（填空默认所有功能，多个功能逗号分开）
     */
    private String featureName;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String applyTime;

    /** 起始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "起始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 失效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "失效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;

    /** 延长时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "延长时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date extendTime;

    /** 状态：00 正常，01 失效 */
    @Excel(name = "状态：00 正常，01 失效")
    private String status;

    /** 备注 */
    @Excel(name = "备注")
    private String note;

    @Excel(name = "手机号码")
    private String phonenumber;

    @Excel(name = "企业名称")
    private String enterpriseName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setLicense(String license)
    {
        this.license = license;
    }

    public String getLicense() 
    {
        return license;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }

    public Date getExtendTime() {
        return extendTime;
    }

    public void setExtendTime(Date extendTime) {
        this.extendTime = extendTime;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setNote(String note) 
    {
        this.note = note;
    }

    public String getNote() 
    {
        return note;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getLicenseType() {
        return licenseType;
    }

    public void setLicenseType(String licenseType) {
        this.licenseType = licenseType;
    }

    public String getMachineCode() {
        return machineCode;
    }

    public void setMachineCode(String machineCode) {
        this.machineCode = machineCode;
    }

    public String getFeatureName() {
        return featureName;
    }

    public void setFeatureName(String featureName) {
        this.featureName = featureName;
    }

    public String getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(String applyTime) {
        this.applyTime = applyTime;
    }

    public String getPhonenumber() {
        return phonenumber;
    }

    public void setPhonenumber(String phonenumber) {
        this.phonenumber = phonenumber;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("license", getLicense())
            .append("startTime", getStartTime())
            .append("expireTime", getExpireTime())
            .append("status", getStatus())
            .append("note", getNote())
            .toString();
    }
}
